using System;
using Fornax020.SerialComm.Core;
using Fornax020.SerialComm.Protocol;

namespace Fornax020.SerialComm.Commands
{
    /// <summary>
    /// 监控查询命令
    /// </summary>
    public class MonitorQueryCommand : CommandBase
    {
        public MonitorQueryCommand()
        {
            Name = "MonitorQuery";
            Description = "查询设备监控数据";
        }

        public override byte[] GetCommandData()
        {
            // 根据协议生成监控查询命令
            // 格式: STX + 'M' + 'O' + CR
            byte[] command = new byte[4];
            command[0] = (byte)ProtocolConstants.STX;  // 起始字节
            command[1] = (byte)'M';  // 监控命令
            command[2] = (byte)'O';  // 监控查询
            command[3] = (byte)ProtocolConstants.CR;   // 结束字节
            
            return command;
        }
    }
}
